package com.ws.q1.service.lmpl;

import com.ws.q1.bean.GongYingShang;
import com.ws.q1.mapper.GongYingShangMapper;
import com.ws.q1.service.GongYingShangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GongYingShanglmpl implements GongYingShangService {
    @Autowired
    private GongYingShangMapper gongYingShangMapper;

    @Override
    public int add(GongYingShang gongYingShang) {
        return gongYingShangMapper.add(gongYingShang.getName(), gongYingShang.getDizhi(), gongYingShang.getPhone());
    }

    @Override
    public List<GongYingShang> list() {
        return gongYingShangMapper.list();
    }

    @Override
    public int deleteById(Integer id) {
        gongYingShangMapper.deleteById(id);
        return 0;
    }

    @Override
    public void update(Integer id, GongYingShang gongYingShang) {
        gongYingShangMapper.update(id, gongYingShang);
    }

    @Override
    public GongYingShang huixian(Integer id) {
        return gongYingShangMapper.huixian(id);
    }

    @Override
    public List<GongYingShang> list2() {
        return gongYingShangMapper.list2();
    }
}
